import request from '@/utils/request'

const api_name = '/phoenix/api/rbac/sysRole'

export default {

  findPage(page, limit, searchObj) {
    return request({
      url: `${api_name}/findPage/${page}/${limit}`,
      method: 'get',
      params: searchObj
    })
  },
  saveSysRole(sysRole) {
    return request({
      url: `${api_name}/save`,
      method: 'post',
      data: sysRole
    })
  },
  findById(id) {
    return request({
      url: `${api_name}/find/${id}`,
      method: 'get'
    })
  },
  updateById(sysRole) {
    return request({
      url: `${api_name}/update`,
      method: 'put',
      data: sysRole
    })
  },
  removeById(id) {
    return request({
      url: `${api_name}/remove/${id}`,
      method: 'delete'
    })
  },
  removeByIds(ids) {
    return request({
      url: `${api_name}/removeByIds`,
      method: 'delete',
      data: ids
    })
  }

}
